package com.zanfeng.signleplatform.results;

import com.github.pagehelper.Page;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * Created by Administrator on 2018/4/16 0016.
 */
public class FormListResult<T> implements Serializable {

    @ApiModelProperty(value = "当前页码", dataType = "String")
    private int currentPage;
    @ApiModelProperty(value = "每页记录数", dataType = "String")
    private int pageSize;
    @ApiModelProperty(value = "总记录数", dataType = "String")
    private long total;
    @ApiModelProperty(value = "数据列表")
    private List<T> list;


    private FormListResult() {
    }

    public FormListResult(Page<T> page) {
        this.currentPage = page.getPageNum();
        this.pageSize = page.getPageSize();
        this.total = page.getTotal();
        this.list = page.getResult();
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
